<?php

# site header
echo $this->load->view('global/header-view.php', isset($header_data) ? $header_data : null);

echo '
	<div id="content">';

# main content
echo $content;

# sidebar
if(!isset($no_sidebar))
	echo $this->load->view('global/sidebar-view.php', isset($sidebar_data) ? $sidebar_data : null);

echo '</div>'; # content

# site footer
echo $this->load->view('global/footer-view.php', isset($footer_data) ? $footer_data : null);